<?php
if(isset($_POST['email_reserve'])) {
     
    // EDIT THE 2 LINES BELOW AS REQUIRED
    $email_to = "demo@crunchpress.com";
    $email_subject = "New Contact Form Submission";
	$error_message = '';
    
     
    function died($error) {
        // your error code can go here
        echo "We are very sorry, but there were error(s) found with the form you submitted. ";
        echo "These errors appear below.<br /><br />";
        echo $error."<br /><br />";
        echo "Please go back and fix these errors.<br /><br />";
        die();
    }
     
    // validation expected data exists
    if(
        !isset($_POST['email_reserve']) ||
        !isset($_POST['name_reserve']) ||
		!isset($_POST['phone_reserve']) ||
		!isset($_POST['date_reserve']) ||
		!isset($_POST['time_reserve']) ||
		!isset($_POST['reserve_guest']) ||
        !isset($_POST['comment_reserve'])) {
        died('We are sorry, but there appears to be a problem with the form you submitted.');      
    }
     
    $rev_name = $_POST['name_reserve']; // required
	$rev_ph = $_POST['phone_reserve']; // required
	$rev_date = $_POST['date_reserve']; // required
	$rev_time = $_POST['time_reserve']; // required
    $email_from = $_POST['email_reserve']; // required
    $comments = $_POST['comment_reserve']; // required
     

  if(strlen($comments) < 2) {
    $error_message .= 'The Comments you entered do not appear to be valid.<br />';
  }
  if(strlen($error_message) > 0) {
    died($error_message);
  }
    $email_message = "Form details below.\n\n";
     
    function clean_string($string) {
      $bad = array("content-type","bcc:","to:","cc:","href");
      return str_replace($bad,"",$string);
    }
    
	$email_message .= "Name: ".clean_string($rev_name)."\n"; 
    $email_message .= "Email: ".clean_string($email_from)."\n";
	$email_message .= "Phone: ".clean_string($rev_ph)."\n";
	$email_message .= "Date: ".clean_string($rev_date)."\n";
	$email_message .= "Time: ".clean_string($rev_time)."\n";
    $email_message .= "Comments: ".clean_string($comments)."\n";
     
     
// create email headers
$headers = 'From: '.$email_from."\r\n".
'Reply-To: '.$email_from."\r\n" .
'X-Mailer: PHP/' . phpversion();
@mail($email_to, $email_subject, $email_message, $headers); 
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Kitchen Cuisine</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--Google Fonts-->
<link href='http://fonts.googleapis.com/css?family=Oswald|Lato|Roboto:400,500,700|Open+Sans:600,700,300' rel='stylesheet' type='text/css'>
<!--Custom Css-->
<link href="css/custom.css" rel="stylesheet" type="text/css">
<!--Colors Css-->
<link href="css/colors_3.css" rel="stylesheet" type="text/css">
<!--Boostrap Css-->
<link href="css/bootstrap.css" rel="stylesheet" type="text/css">
<!--Boostrap-Responsice Css-->
<link href="css/bootstrap-responsive.css" rel="stylesheet" type="text/css">
<!--Calender Css-->
<link rel='stylesheet' type='text/css' href='css/fullcalendar.css' />
<!--Awesome Fonts-->
<link href="css/font-awesome.css" rel="stylesheet">
<!--Banner Slider-->
<link rel="stylesheet" href="css/flexslider.css" type="text/css" media="screen" />
<!--Scrollbar Css-->
<link href="css/jquery.mCustomScrollbar.css" rel="stylesheet" />
<!--Pie Chart Css-->
<link rel="stylesheet" type="text/css" href="css/style.css" media="screen">
<!-- Html5 Js -->
<script src="js/html5.js" type="text/javascript"></script>

<script type="text/javascript">
<!--
function delayer(){
    window.location = "<?php echo $_SERVER['HTTP_REFERER']; ?>"
}
//-->
</script>
</head>

<body>
<!--Wrapper Start-->
<div id="wrapper"> 
  <!--Header Start-->
  <header id="header">
    <div class="container">
      <div class="row-fluid">
        <div class="span3">
          <div class="logo"><a href="index.php"><img src="images/logo-img.png" alt="img"></a></div>
        </div>
        <div class="span9 margin-non">
          <div class="top-container"></div>
          <div class="navbar navbar-inverse nav-bar">
            <div class="navbar-inner nav-bar-inner">
              <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button>
              <div class="nav-collapse collapse top-nav">
                <ul class="nav">
                  <li class="dropdown"> <a class="dropdown-toggle" href="index.php"> Home </a>
                  <ul class="dropdown-menu">
                      <li><a href="index.php">Full Width</a></li>
                      <li><a href="index-boxed.php">Boxed</a></li>
                      <li><a href="index-dark.php">Dark theme</a></li>
                    </ul>
                   </li>
                  <li class="dropdown"> <a class="dropdown-toggle" href="about-us.html"> About</a>
                    <ul class="dropdown-menu">
                      <li><a href="index.php">Full Width</a></li>
                      <li><a href="index-boxed.php">Boxed</a></li>
                      <li><a href="index-dark.php">Dark theme</a></li>
                    </ul>
                  </li>
                  <li class="dropdown"> <a class="dropdown-toggle" href="crowdfunding_listing.html" > Menu </a>
                    <ul class="dropdown-menu">
                      <li><a href="crowdfunding_listing.html">Project Listing</a></li>
                      <li><a href="crowdfunding_detail.html">Project Detail</a></li>
                      <li><a href="crowdfunding_payment.html">Project Payment </a></li>
                    </ul>
                  </li>
                  <li class="dropdown"> <a class="dropdown-toggle" href="product_listing_list.php" > Gallery </a>
                    <ul class="dropdown-menu">
                      <li><a href="product_listing_grid.html">Store Grid View</a></li>
                      <li><a href="product_listing_list.php">Store List View</a></li>
                      <li><a href="product_detail.html">Product Detail</a></li>
                      <li><a href="cart.php">Cart Page</a></li>
                      <li><a href="checkout.php">Checkout Page</a></li>
                    </ul>
                  </li>
                  <li class="dropdown"> <a class="dropdown-toggle" href="blog.php" > Blog </a>
                    <ul class="dropdown-menu">
                      <li><a href="blog.php">Blog Listing</a></li>
                      <li><a href="blog_detail.html">Single Post</a></li>
                    </ul>
                  </li>
                  <li class="dropdown"> <a class="dropdown-toggle" href="contact.html" > Contact</a></li>
                </ul>
              </div>
              <!--/.nav-collapse --> 
            </div>
            <!-- /.navbar-inner --> 
          </div>
          <!--Nav End--> 
        </div>
      </div>
    </div>
  </header>
  <!--Header End--> 

  <!-- Start of 404 page-->

  <section id="content_Wrapper" class="mbtm">

    <section class="container container-fluid">

      <section class="row-fluid">

        <section class="span12 error-page">

          <h2>Thank You</h2>

          <p>Thank you for your submission, as soon as we get this we will get back to you shortly.</p>

        </section>

      </section>

    </section>

  </section>

  <!-- End of 404 page-->


<!-- jQuery --> 
<script type="text/javascript" src="js/jquery.js"></script><!-- lib Js --> 

<!-- Bootstrap --> 
<script src="js/bootstrap.min.js" type="text/javascript"></script><!-- Boostrap Js --> 

<!-- FlexSlider --> 
<script defer src="js/jquery.flexslider.js"></script> <!-- FlexSlider --> 

<!-- Custom Scripts --> 
<script src="js/custom.js" type="text/javascript"></script><!-- Boostrap Js --> 

<!-- Calender --> 
<script type='text/javascript' src='js/jquery-ui-1.8.23.custom.min.js'></script><!-- Calender Js--> 
<script type='text/javascript' src='js/fullcalendar.js'></script><!-- Calender Js--> 

<!--Google Map--> 
<script type="text/javascript" src="js/google.map.js"></script><!--Google Map--> 

<!--Scrool js--> 
<script src="js/jquery.mCustomScrollbar.concat.min.js"></script><!--Scrool js--> 

<!--Pie Chart--> 
<script type="text/javascript" src="js/excanvas.js"></script> <!--Pie Chart--> 
<script type="text/javascript" src="js/jquery.easy-pie-chart.js"></script><!--Pie Chart--> 

<!--Bx Slider--> 
<script src="js/jquery.bxslider.js"></script> <!--Bx Slider--> 

<!--Wrapper End-->
</body>
</html>
<?php
}
?>